<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>panda bear</title>
    <script>
        function getMax(number) {
            var max = number[0];
            for (var i=1;i<number.length;i++){
                if (number[i]>max){
                    max=number[i];
                }
            }
            return max;
        }

        alert(getMax([1,89,2,0]));
    </script>
</head>
<body>

</body>
</html>